<html lang="zh-cn">
<head>
{% include "tdm_include_head_template.html" %}

<script type="text/javascript">
</script>

</head>

<body class=" theme-blue">
{% include "tdm_include_navbar_template.html" %}

<div class="container">
  <br/>
  {% include "tdm_include_error_template.html" %}

  {% include "tdm_include_admin_page_template.html" %}

  <br/>

  <div class="panel panel-default">
    <div class="panel-heading">
      问题提交
    </div>
    <table class="table table-hover">
    <tr>
      <th class="nobreak">时间</th>
      <th class="nobreak">提交人</th>
      <th class="nobreak">问题内容</th>
      <th class="nobreak">解决</th>
    </tr>
    {% for problem in problem_list %}
    <tr>
      <td class="nobreak"><script>sec2time({{problem.time}}, "auto");</script></td>
      <td>{{problem.mail}}</td>
      <td>{{problem.content}}</td>
      <td>{{problem.fixup}}</td>
    </tr>
    {% endfor %}
    </table>
    <div class="panel-body">
      <form id="prob_add_form" action="/tdm/admin/dev/" method="post" class="form-horizontal" role="form">
        <div class="form-group">
          <label for="user_email" class="col-sm-1 control-label">邮箱</label>
          <div class="col-sm-11">
            <input type="email" class="form-control" name="user_email" placeholder="邮箱">
          </div>
        </div>
        <div class="form-group">
          <label for="new_role" class="col-sm-1 control-label">问题</label>
          <div class="col-sm-11">
            <textarea class="form-control" rows="3" name="problem"></textarea>
          </div>
        </div>
        <div class="form-group">
          <div class="col-sm-11 col-sm-offset-1">
            <button type="submit" name="op" value="prob_add" class="btn btn-primary">添加</button>
          </div>
        </div>
      </form>
    </div>
  </div>

  <div class="panel panel-default">
    <div class="panel-heading">
      当前版本号 <strong>{{dev_rev}}</strong>
    </div>
    <table class="table table-hover">
    <tr><th>rev</th><th>user</th><th>commit</th><th>message</th></tr>
    {% for dev_log in dev_log_list %}
    <tr>
      <td><a href="http://gitlab.chuangxin.xes/qujianning/tdm_all/commit/{{dev_log.rev}}" target="_blank">{{dev_log.rev}}</a></td>
      <td>{{dev_log.dev_user}}</td>
      <td>{{dev_log.commit_tm}}</td>
      <td>{{dev_log.commit_msg}}</td>
    </tr>
    {% endfor %}
    </table>
  </div>

  <div class="form-context">
  </div>

{% include "tdm_include_footer_template.html" %}
</div>
</body>
</html>